package com.nstar.orderexpress.view
{
	import mx.containers.Canvas;
	import mx.controls.Text;
	import mx.events.FlexEvent;
	import com.nstar.base.util.EffectUtils;
	import mx.events.ItemClickEvent;
	import mx.core.Application;
	import mx.controls.LinkBar;
	import com.nstar.orderexpress.model.Model;
	import com.nstar.base.util.Logger;
	import mx.containers.VBox;
	import mx.controls.Label;

	public class HeaderClass extends VBox
	{
		public var txtTitle:Label;
		public var menus:LinkBar;
		
		private var model:Model = Model.getInstance();
		private var logger:Logger = Logger.getInstance();
			
		public function HeaderClass()
		{
			//TODO: implement function
			super();
			this.addEventListener(FlexEvent.CREATION_COMPLETE,init);
		}
		
		private function init(event:FlexEvent):void{
			//EffectUtils.setFlowEffect(txtTitle);
			menus.addEventListener(ItemClickEvent.ITEM_CLICK,itemclickHandler);
		}
		
		private function itemclickHandler(event:ItemClickEvent):void{
			model.mainApp.mainView.vsMenus.selectedIndex = event.index +1;
			
		}
		
		
	}
}